package com.yookey.study;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Window;
import android.view.WindowManager;

import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.facade.callback.NavCallback;
import com.alibaba.android.arouter.launcher.ARouter;
import com.base.mine.config.RouteConfig;
import com.click.guide.guide_lib.GuideCustomViews;
import com.click.guide.guide_lib.interfaces.CallBack;

/**
 * Created by Administrator on 2020/2/12.
 */

@Route(path = "/study/guide")
public class GuideActivity extends AppCompatActivity implements CallBack {

    private GuideCustomViews guideCustomViews;

    private final int[] mPageImages = {
            R.mipmap.ic_page_one,
            R.mipmap.ic_page_two,
            R.mipmap.ic_page_two
    };

    private final int[] mGuidePoint = {
            R.drawable.ic_circle_dot,
            R.drawable.ic_rect_dot
    };






    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_guide);

        initView();
    }

    private void initView() {
        guideCustomViews = findViewById(R.id.guide_CustomView);
        guideCustomViews.setData(mPageImages, mGuidePoint, this);
    }



    @Override
    protected void onDestroy() {
        super.onDestroy();

    }

    @Override
    public void callSlidingPosition(int i) {

    }

    @Override
    public void callSlidingLast() {
        Log.e("callSlidingLast", "滑动到最后一个callSlidingLast");
        ARouter.getInstance().build(RouteConfig.ACTIVITIY_LOGIN).navigation(this, new NavCallback() {
            @Override
            public void onArrival(Postcard postcard) {
                finish();
            }
        });
    }

    @Override
    public void onClickLastListener() {

    }
}
